package com.apestech.framework.xml.plugin.modul;

import com.apestech.framework.db.callback.FieldValueCallback;
import com.apestech.framework.db.callback.TableJsonCallBackHandler;
import com.apestech.framework.json.JSONObject;
import com.apestech.framework.sql.callback.SqlCallback;
import com.apestech.framework.util.LocalVariable;

/**
 * @author hup
 * @create 2018-12-19-16:29
 */
public class QryConfig {
    private String sysId;
    private String qryConType;
    private String outputType;
    private String outputWeb;
    private SqlCallback sqlCallback =null;
    private FieldValueCallback fieldValueCallback=null;

    public QryConfig() {

    }

    public QryConfig(JSONObject json) {
        sysId=json.getString("sysId");
        qryConType=json.getString("qryConType");
        outputType=json.getString("outputType");
        outputWeb=json.getString("outputWeb");
        if(qryConType!=null || outputType!=null ) sqlCallback = LocalVariable.getSysQuery().getDictDataCallback(qryConType);
    }

    public void setSqlCallback(SqlCallback sqlCallback) {
        this.sqlCallback = sqlCallback;
    }

    public String getSysId() {
        return sysId;
    }

    public String getQryConType() {
        return qryConType;
    }

    public String getOutputType() {
        return outputType;
    }

    public String getOutputWeb() {
        return outputWeb;
    }

    public SqlCallback getSqlCallback() {
        return sqlCallback;
    }

    public FieldValueCallback getFieldValueCallback() {
        return fieldValueCallback;
    }

    public void setFieldValueCallback(FieldValueCallback fieldValueCallback) {
        this.fieldValueCallback = fieldValueCallback;
    }
}
